/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: AliceMana
 * Date: 2022-08-05
 * Time: 23:02
 */
public class TestDemo {
    public int a;
    public int b;

    //无参的构造方法
    TestDemo() {

    }

    @Override
    public String toString() {
        return "TestDemo{" +
                "a=" + a +
                ", b=" + b +
                '}';
    }

    //有参的构造方法
    TestDemo(int a, int b) {
        System.out.println("a=" + a + ", b=" + b);
    }

    public static void main(String[] args) {
        TestDemo testDemo = new TestDemo();
        System.out.println(testDemo);
    }
}
